home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
qbasicpg.zip
/
LINE-2.BAS
< prev
next >
Wrap
BASIC Source File
|
1989-08-31
|
859b
|
32 lines
' LINE-2.BAS
' This program demonstrates the box-drawing capabilities
' of the LINE statement.
CLS
INPUT "Please enter a screen mode (0-13): ", modeNum%
INPUT "How many colors? ", numColors%
INPUT "Hollow or solid boxes (H or F)? ", box$
SCREEN modeNum%
CONST DELAY% = 800
DO
shade% = INT(RND(1) * numColors%) + 1 ' line color
x1pos% = INT(RND(1) * 320) ' start coordinates
y1pos% = INT(RND(1) * 200)
x2pos% = INT(RND(1) * 320) ' end coordinates
y2pos% = INT(RND(1) * 200)
IF UCASE$(box$) = "H" THEN
LINE (x1pos%, y1pos%)-(x2pos%, y2pos%), shade%, B
ELSEIF UCASE$(box$) = "F" THEN
LINE (x1pos%, y1pos%)-(x2pos%, y2pos%), shade%, BF
END IF
FOR i% = 1 TO DELAY% ' delay loop
NEXT i%
LOOP UNTIL INKEY$ <> ""